package com.soladhoc.annonces.shared.service;

import com.google.web.bindery.requestfactory.shared.Request;
import com.google.web.bindery.requestfactory.shared.RequestContext;
import com.google.web.bindery.requestfactory.shared.RequestFactory;
import com.google.web.bindery.requestfactory.shared.Service;
import com.soladhoc.annonces.server.locator.DaoServiceLocator;
import com.soladhoc.annonces.server.service.AnnonceDao;
import com.soladhoc.annonces.shared.proxy.AnnonceProxy;

public interface AnnonceRequestFactory extends RequestFactory {

	@Service(value = AnnonceDao.class, locator = DaoServiceLocator.class)
	public interface AnnonceService extends RequestContext {

		Request<AnnonceProxy> save(AnnonceProxy editable);

		Request<AnnonceProxy> fetch(Long id);
		
		Request<AnnonceProxy> fetchRange(int first, int range);
	}

	AnnonceService annonceService();
}
